{extend name="public/base" /}

{block name="content-header"}
<!-- Content Header (Page header) -->
<div class="content-header">
	<div class="container-fluid">
		<div class="card card-content-nav">
			<div class="card-header pb-1 pt-1">
				<div class="row">
					<div class="col-sm-12">
						<ol class="breadcrumb float-sm-left">
							<li>您当前的位置：</li>
							<li class="breadcrumb-item"><a href="{:Url('index/index')}">首页</a></li>
							<li class="breadcrumb-item active">用户列表</li>
						</ol>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.card-header -->
		</div><!-- /.card -->
		<div class="card card-content-nav">
			<div class="card-header pb-1 pt-1">
				<div class="row mb-1 mt-1">
					<div class="col-sm-6 p-0">
						<a href="javascript:location.reload();"><button type="button" class="btn btn-sm btn-info"><i class="fa fa-refresh"></i></button></a>
						<a href="javascript:history.go(-1);"><button type="button" class="btn btn-sm btn-info"><i class="fa fa-reply"></i></button></a>
						<a href="{:Url('add')}"><button type="button" class="btn btn-sm btn-success"><i class="fa fa-plus"></i>新增</button></a>
						<button type="button" class="btn btn-sm btn-success ajax-post" url="{:Url('changeStatus?method=resumeUser')}" target-form="ids"><i class="fa fa-eye"></i>启用</button>
						<button type="button" class="btn btn-sm btn-warning ajax-post" url="{:Url('changeStatus?method=forbidUser')}" target-form="ids"><i class="fa fa-eye-slash"></i>禁用</button>
						<button type="button" class="btn btn-sm btn-danger ajax-post confirm" url="{:Url('changeStatus?method=deleteUser')}" target-form="ids"><i class="fa fa-remove"></i>删除</button>
					</div>
				</div><!-- /.row -->
			</div><!-- /.card-header -->
		</div><!-- /.card -->
	</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
{/block}

{block name="content-content"}
<!-- Main content -->
<section class="content">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<div class="card">
					<div class="card-body p-0">
						<div class="table-responsive">
							<table class="table m-0">
								<thead>
									<tr>
										<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
										<th class="">UID</th>
										<th class="">昵称</th>
										<th class="">积分</th>
										<th class="">登录次数</th>
										<th class="">最后登录时间</th>
										<th class="">最后登录IP</th>
										<th class="">状态</th>
										<th class="">操作</th>
									</tr>
								</thead>
								<tbody>
									{notempty name="_list"}
									{volist name="_list" id="vo"}
									<tr>
										<td><input class="ids" type="checkbox" name="id[]" value="{$vo.uid}" /></td>
										<td>{$vo.uid} </td>
										<td>{$vo.nickname}</td>
										<td>{$vo.score}</td>
										<td>{$vo.login}</td>
										<td><span>{notEmpty name="vo.last_login_time"}{$vo.last_login_time|time_format}{else /}——{/notEmpty}</span></td>
										<td><span>{:long2ip($vo['last_login_ip'])}</span></td>
										<td>{$vo.status_text|default=""}</td>
										<td>{eq name="vo.status" value="1"}
											<a href="{:Url('User/changeStatus?method=forbidUser&id='.$vo['uid'])}" class="ajax-get">禁用</a>
											{else/}
											<a href="{:Url('User/changeStatus?method=resumeUser&id='.$vo['uid'])}" class="ajax-get">启用</a>
											{/eq}
											<a href="{:Url('Authmanage/group?uid='.$vo['uid'])}" class="authorize">授权</a>
											<a href="{:Url('User/changeStatus?method=deleteUser&id='.$vo['uid'])}" class="confirm ajax-get">删除</a>
										</td>
									</tr>
									{/volist}
									{else/}
									<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
									{/notempty}
								</tbody>
							</table>
						</div>
						<!-- /.table-responsive -->
					</div>
					<!-- /.card-body -->
					<div class="card-footer p-0">
						{$_page|raw}
					</div>
					<!-- /.card-footer -->
				</div>
			</div>
		</div>
	</div><!-- /.container-fluid -->
</section>
<!-- /.content -->

<!-- Main content -->
<!-- /.content -->
{/block}

{block name='script'}
<script src="__THEME__/default/view/admin/static/js/common.js?v={:time_version()}"></script>
<script type="text/javascript" charset="utf-8">
	//导航高亮
	highlight_subnav('{:Url('user/index')}');
</script>
{/block}
